﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OOLib
{
   /// <summary>
   /// Specifies a rectangular area by position and size.
   /// </summary>
   public class Rectangle : ComObjectWrapper
   {
      #region Constructors

      /// <summary>
      /// Constructor
      /// </summary>
      /// <remarks>
      /// After using this constructor, the ComObj must be set manually!
      /// </remarks>
      public Rectangle() :
         base()
      { }

      /// <summary>
      /// Constructor
      /// </summary>
      /// <param name="comObject">COM object</param>
      public Rectangle(object comObject) :
         base(comObject)
      { }

      #endregion

      /// <summary>
      /// Gets or sets the x-coordinate.
      /// </summary>
      public int X
      {
         get
         {
            CheckDisposed();
            return (int)GetProperty("X");
         }
         set
         {
            CheckDisposed();
            SetProperty("X", value);
         }
      }
      
      /// <summary>
      /// Gets or sets the y-coordinate.
      /// </summary>
      public int Y
      {
         get
         {
            CheckDisposed();
            return (int)GetProperty("Y");
         }
         set
         {
            CheckDisposed();
            SetProperty("Y", value);
         }
      }
      
      /// <summary>
      /// Gets or sets the width.
      /// </summary>
      public int Width
      {
         get
         {
            CheckDisposed();
            return (int)GetProperty("Width");
         }
         set
         {
            CheckDisposed();
            SetProperty("Width", value);
         }
      }
      
      /// <summary>
      /// Gets or sets the height.
      /// </summary>
      public int Height
      {
         get
         {
            CheckDisposed();
            return (int)GetProperty("Height");
         }
         set
         {
            CheckDisposed();
            SetProperty("Height", value);
         }
      }
   }
}
